package cn.shop.front.service;

import cn.shop.base.MyPage;
import cn.shop.front.entity.order.SimpleOrder;
import cn.shop.front.entity.req.GameOrderQueryReq;
import cn.shop.front.entity.req.OrderQueryReq;
import cn.shop.utils.enums.GoodsType;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author jzw
 * @since 2021-11-30 09:47
 */
public interface OrderService extends IService<SimpleOrder> {

	MyPage<SimpleOrder> orderList(MyPage<SimpleOrder> page, Long gameId, Long partitionId, GoodsType goodsType, Integer orderByDownTime);

	MyPage<SimpleOrder> orderListApp(MyPage<SimpleOrder> page, List<Long> gameIds);

	MyPage<SimpleOrder> orderList(MyPage<SimpleOrder> page, GameOrderQueryReq req);

	/**
	 * 检验当前商品是否可买
	 *
	 * @param orderId 商品id
	 * @author jzw
	 * @since 2022-01-07 15:45:19
	 */
	Boolean checkOrder(Long orderId);

	/**
	 * 获取未领取列表
	 *
	 * @param current 第几页
	 * @param size 每页记录数
	 * @param userId 用户编号
	 * @return 返回结果
	 */
	Map<String, Object> unreceivedList(int current, int size, long userId);

	MyPage<SimpleOrder> orderList(MyPage<SimpleOrder> page, OrderQueryReq req);

}
